

package com.hazelcast.sql.impl.client;

public class SqlFetchResult {

    private SqlPage page;
    private RuntimeException error;

    public boolean isPending() {
        return page == null && error == null;
    }

    public SqlPage getPage() {
        return page;
    }

    public RuntimeException getError() {
        return error;
    }

    public void onResult(SqlPage page, RuntimeException error) {
        this.page = page;
        this.error = error;
    }
}
